# Maintainer: Antonio Rojas <arojas@archlinux.org>

pkgname=rankwidth
pkgver=0.9
pkgrel=2
pkgdesc='A program that calculates rank-width and rank-decompositions'
arch=(loong64 x86_64)
url='https://sourceforge.net/projects/rankwidth/'
license=(GPL2)
depends=(igraph)
makedepends=()
source=(https://master.dl.sourceforge.net/project/rankwidth/rw-$pkgver.tar.gz
        igraph-0.10.patch)
sha256sums=('c1e03506fe25cdfcb428c051fc56b2d2affb5b06fba3f2ce756631466befb441'
            '328d8ee4aeac26cbd104c02e156cf511aeb736d1a1a6903071c055714bb9c4c4')

prepare() {
  patch -d rw-$pkgver -p1 < igraph-0.10.patch # Fix build with igraph 0.10
}

build() {
  cd rw-$pkgver
  ./configure --prefix=/usr
  make
}

package() {
  cd rw-$pkgver
  make install DESTDIR="$pkgdir"
}
